import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'
const userInfo = 'vue_admin_template_userInfoCook'
const stampKey = 'timeStamp'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function setUserInfo(data) {
  return Cookies.set(userInfo, data)
}

export function removeUserInfo() {
  return Cookies.remove(userInfo)
}
export function setStamp() {
  return Cookies.set(stampKey, +new Date())
}
export function getStamp() {
  return Cookies.get(stampKey)
}

